{extend name="layout" /}
{block name="head"}
<style>
    html{background: #FFF;}
</style>
{/block}
{block name="page"}
<form class="layui-form">
    <div class="layui-form-item">
        <label class="layui-form-label">角色名称</label>
        <div class="layui-input-block">
            <input type="text" name="name" lay-verify="required" placeholder="请输入角色名称" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">角色描述</label>
        <div class="layui-input-block">
            <textarea name="description" placeholder="请输入角色描述" class="layui-textarea"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-block">
            <input type="radio" name="lock" value="0" title="正常" checked>
            <input type="radio" name="lock" value="1" title="锁定">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">原因</label>
        <div class="layui-input-block">
            <input type="text" name="lock_msg" placeholder="请输入用户被锁定原因" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="dosub">提 交</button>
        </div>
    </div>
</form>
{/block}
{block name="js"}
<script>
    layui.config({
        base: '__STATIC__/js/'
    }).use(['app'], function () {
        var app=layui.app;
        var $ = layui.$;
        var form = layui.form;
        form.on('submit(dosub)', function (data) {
            app.post(data.field, 1);
            return false;
        });
    });
</script>
{/block}